package com.hfjyz.judge.judge.bean;

import com.hfjyz.base.util.CodeUtil;

public class JudgeExcelBean extends JudgeBean {

    /**
     * serialVersionUID
     */
    private static final long serialVersionUID = 4199943623842048876L;

    private String sexValue = null;
    private String topEducationValue = null;
    private String educationTypeValue = null;

    public JudgeExcelBean() {
    }

    public JudgeExcelBean(JudgeBean judge) {
        this.address = judge.address;
        this.birthday = judge.birthday;
        this.cellPhone = judge.cellPhone;
        this.educationType = judge.educationType;
        this.educationTypeValue = CodeUtil.getEducationType(judge.educationType);
        this.graduatedFrom = judge.graduatedFrom;
        this.id = judge.id;
        this.idNo = judge.idNo;
        this.imAddress = judge.imAddress;
        this.mailAddress = judge.mailAddress;
        this.name = judge.name;
        this.post = judge.post;
        this.sex = judge.sex;
        this.sexValue = CodeUtil.getSexString(judge.sex);
        this.skillsCert = judge.skillsCert;
        this.subject = judge.subject;
        this.title = judge.title;
        this.topEducation = judge.topEducation;
        this.topEducationValue = CodeUtil.getEducation(judge.topEducation);
        this.trainExperience = judge.trainExperience;
        this.workAddress = judge.workAddress;
        this.workExperience = judge.workExperience;
        this.workPhone = judge.workPhone;
        this.workUnit = judge.workUnit;
        this.photo = judge.photo;
        this.homePhone = judge.homePhone;
        this.hometown = judge.hometown;
        this.speciality = judge.speciality;
        this.isSigned = judge.isSigned;
        this.regDate = judge.getRegDate();
        this.remark = judge.remark;
    }

    public String getSexValue() {
        return sexValue;
    }

    public void setSexValue(String sexValue) {
        setSex(CodeUtil.getSexCode(sexValue));
        this.sexValue = sexValue;
    }

    public String getTopEducationValue() {
        return topEducationValue;
    }

    public void setTopEducationValue(String topEducationValue) {
        setTopEducation(CodeUtil.getEducationCode(topEducationValue));
        this.topEducationValue = topEducationValue;
    }

    public String getEducationTypeValue() {
        return educationTypeValue;
    }

    public void setEducationTypeValue(String educationTypeValue) {
        setEducationType(CodeUtil.getEducationTypeCode(educationTypeValue));
        this.educationTypeValue = educationTypeValue;
    }

    public String getSignValue() {
        return signValue;
    }

    public void setSignValue(String signValue) {
        if (signValue == null || signValue.trim().isEmpty()) {
            setIsSigned(0);
        } else {
            setIsSigned(1);
        }
        this.signValue = signValue;
    }
}
